﻿
namespace VS.Web.Model
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Objects.DataClasses;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;


    // The MetadataTypeAttribute identifies ArticleMetadata as the class
    // that carries additional metadata for the Article class.
    [MetadataTypeAttribute(typeof(Article.ArticleMetadata))]
    public partial class Article
    {

        // This class allows you to attach custom attributes to properties
        // of the Article class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class ArticleMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ArticleMetadata()
            {
            }

            public string Content { get; set; }

            public int Id { get; set; }

            public EntityCollection<Tag> Tags { get; set; }

            public string Title { get; set; }

            public User User { get; set; }

            public string User_Name { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies TagMetadata as the class
    // that carries additional metadata for the Tag class.
    [MetadataTypeAttribute(typeof(Tag.TagMetadata))]
    public partial class Tag
    {

        // This class allows you to attach custom attributes to properties
        // of the Tag class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class TagMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private TagMetadata()
            {
            }

            public Article Article { get; set; }

            public int Article_Id { get; set; }

            public int Id { get; set; }

            public string Name { get; set; }
        }
    }
}
